{% extends 'Common/Test/layout.common.html.twig' %}
    {% block myJs %}
        <script src="/print/jquery-1.10.2.min.js{{ rnd }}"></script>
        <script src="/print/jQuery.print.js{{ rnd }}"></script>
        <script src="/print/drag.js{{ rnd }}"></script>
        <script src="/print/print.js{{ rnd }}"></script>
        <script src="/print/data.js{{ rnd }}"></script>
        {% if tpl %}
            <script type="application/javascript" language="JavaScript">
                $(function () {
                    MainData = {{ tpl.content | raw }};
                    updateAll();
                })
            </script>
        {% endif %}
    {% endblock %}
    {% block myCss %}
        <link rel="stylesheet" href="/ac/css/color.css">
        <link rel="stylesheet" href="/ac/css/font.css">
        <link rel="stylesheet" href="/ac/css/layout.css">
        <link rel="stylesheet" href="/ac/css/border.css">
        <link rel="stylesheet" href="/ac/css/flex.css">
        <link rel="stylesheet" href="/ac/css/table.css">
        <link rel="stylesheet" href="/ac/css/fa.css">
        <link rel="stylesheet" href="/ac/css/app.css">
        <link rel="stylesheet" href="/print/css.css{{ rnd }}">
    {% endblock %}

{% block body %}
    <body class="body flex-c">
    <div class="top flex-r flex-center flex-fill bdso fs16 c3 bc1">

        <div class="flex-c ">
            <div class="fs16 pad10">
                数据源
            </div>

            <div class="fs12 pad10 flex-r flex-center">
                <div class="btn copy pad10 fs12 c13 tac">
                    写入
                </div>
                <div class="btn dealWithData pad10 fs12 c13 tac">
                    解析
                </div>
            </div>
            <div class="pad10 fs12 c13 tac">
                <form action="" id="excel" enctype="multipart/form-data" method="post">
                    <div class="padl10 fs12 c13">
                        <label for="dataInput" class="btn bdso pad3">选择打印文件</label>
                        <input name="Filedata" class="flex1 hidden" type="file" id="dataInput" onchange="uploadExcel()" />
                    </div>
                </form>
            </div>
        </div>
        <div class="flex-c bdlda">
            <div class="fs16 pad10">纸张设置</div>
            <div class=" pad10">
                <input id="paperW" type="text" placeholder="输入纸张宽度,默认210" onchange="setPaper()"/>
            </div>
            <div class=" pad10">
                <input id="paperH" type="text" placeholder="输入纸张长度,默认297" onchange="setPaper()"/>
            </div>
        </div>
        <div class="flex-c bdlso padr30">
            <div class="fs16 pad10">
                页面增减
            </div>
            <div class="btn redPage pad10 fs12 c13">
                减一页
            </div>
            <div class="btn addPage pad10 fs12 c13">
                加一页
            </div>
        </div>
        <div class="flex-c bdlda">
            <div class="fs16 pad10">页面设置
                [<span class="curPage">0</span>]
            </div>
            <div class=" padl10 fs12 c13 padt10">

                <label for="imgInput">字体大小</label>
                <input type="text" id="fontSize" value="16" onchange="setFontSize()" style="width: 36px;" />
            </div>
            <div class=" padl10 fs12 c13 padt10">
                <label for="imgInput" class="btn bdso pad3">选择背景图片</label>
                {#<input type="file" class="hidden" id="imgInput" onchange="preImg(this.id);" />#}
                <input type="file" class="hidden" id="imgInput" onchange="setPic(this.id);" />
            </div>
            <div class="flex-r flex-center  fs12 c13 padt10">
                <div class="padl10">高度微调</div>
                <div class="btn addH fs16 padl10 padr10">+</div>
                <div class="btn redH fs16 padl10 padr10">-</div>
                <div class="btn resetH flex1 tac padl10 padr10">reset</div>
            </div>
        </div>
        <div class="flex-c bdlda">
            <div class="fs16 pad10">模板保存
            </div>
            <div class=" pad10">
                <input id="tplName" type="text" placeholder="请输入模板名称" onchange=""/>
            </div>
            <div class=" pad10">
                <input id="tplSave" type="button" value="保存模板" onclick="saveTpl()"/>
            </div>
        </div>
        {#<div class="btn redPage flex-c  flex-center tac bdlso pad30">#}
            {#减一页#}
        {#</div>#}
        {#<div class="btn addPage flex-c  flex-center tac bdlso pad30">#}
            {#加一页#}
        {#</div>#}
        <div class="flex1 bdlso">

        </div>
        <div class="flex-c  flex-center tac bdlso pad30">
            <div class="btn hidePic flex1 tac tam pad10">隐藏背景</div>
            <div class="btn showPic flex1 tac tam pad10">显示背景</div>
        </div>
        <div class="flex-c flex-center bdlda">
            {#<div class="pad10">数据打印</div>#}
            <div class="btn tac pad10" id="prevData">上一条</div>
            <div class="btn tac pad10" id="nextData">下一条</div>
        </div>
        <div class="btn printIt flex-c  flex-center tac bdlso pad30">
            预览打印
        </div>
    </div>
    <div id="dataBox" class="hidden">
        <div></div>
        <div class="pad10 bdso">
            <form id="formT" action="/app_dev.php/p/deal" method="post" enctype="multipart/form-data">
            <textarea class="dataInput" name="text">1,3,4</textarea>
            </form>
        </div>
    </div>
    <div class="flex-r flex1">
        <div id="contentBox">
            <div class="content" id="content"></div>
        </div>
        <div class="right flex1 c3">
           <div id="items" class=" flex-r flex-wrap"></div>
        </div>
    </div>
    </body>
{% endblock %}
